package com.boil.qz.safekavass.model;

import javax.persistence.*;

/**
 * Created by ChenYong on 2017-04-18.
 * <br>
 * 学习资料实体类。
 */
@Entity
@Table(name = "TB_LEARN_FILES_DATA")
public class LearnFileData extends BaseEntity {
    /**
     * 序列化
     */
    private static final long serialVersionUID = 6725236477110304413L;
    /**
     * 学习动态标题
     */
    private String learnName;
    /**
     * 学习动态内容
     */
    private String learnContent;
    /**
     * 创建人
     */
    private String learnCreatePerson;
    /**
     * 学习动态附件的路径：多个使用分隔符分开
     */
    private String learnFiles;
    /**
     * 学习动态附件的名称：多个使用分隔符分开
     */
    private String learnFilesName;
    /**
     * 资料类型：A-煤矿，B-非煤矿山，C-危化烟花爆竹，D-职业健康和工贸，F-法律法规，G-处罚标准
     */
    private String learnType;
    /**
     * 学习动态创建时间
     */
    private String learnCreateTime;
    /**
     * 创建人（急加载）
     */
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "LEARN_CREATE_PERSON_ID")
    private LoginUser loginUser;

    /**
     * 默认构造器。
     */
    public LearnFileData() {
        super();
    }

    public String getLearnName() {
        return learnName;
    }

    public void setLearnName(String learnName) {
        this.learnName = learnName;
    }

    public String getLearnContent() {
        return learnContent;
    }

    public void setLearnContent(String learnContent) {
        this.learnContent = learnContent;
    }

    public String getLearnCreatePerson() {
        return learnCreatePerson;
    }

    public void setLearnCreatePerson(String learnCreatePerson) {
        this.learnCreatePerson = learnCreatePerson;
    }

    public String getLearnFiles() {
        return learnFiles;
    }

    public void setLearnFiles(String learnFiles) {
        this.learnFiles = learnFiles;
    }

    public String getLearnFilesName() {
        return learnFilesName;
    }

    public void setLearnFilesName(String learnFilesName) {
        this.learnFilesName = learnFilesName;
    }

    public String getLearnType() {
        return learnType;
    }

    public void setLearnType(String learnType) {
        this.learnType = learnType;
    }

    public String getLearnCreateTime() {
        return learnCreateTime;
    }

    public void setLearnCreateTime(String learnCreateTime) {
        this.learnCreateTime = learnCreateTime;
    }

    public LoginUser getLoginUser() {
        return loginUser;
    }

    public void setLoginUser(LoginUser loginUser) {
        this.loginUser = loginUser;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("LearnFileData{");
        sb.append("learnName='").append(learnName).append('\'');
        sb.append(", learnContent='").append(learnContent).append('\'');
        sb.append(", learnCreatePerson='").append(learnCreatePerson).append('\'');
        sb.append(", learnFiles='").append(learnFiles).append('\'');
        sb.append(", learnFilesName='").append(learnFilesName).append('\'');
        sb.append(", id=").append(id);
        sb.append(", learnType='").append(learnType).append('\'');
        sb.append(", learnCreateTime='").append(learnCreateTime).append('\'');
        sb.append(", loginUser=").append(loginUser);
        sb.append('}');
        return sb.toString();
    }
}